home *** CD-ROM | disk | FTP | other *** search
/ 3D Games (Spidla) / 3dhry2.iso / Cube Drop 2001 1.0 / MainFrm.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2003-03-17  |  1.9 KB  |  89 lines

  1. /*
  2. Authors: David Nishimoto and Thomas Lee Young
  3. Website: http://www.listensoftware.com
  4. Program: Cube Drop
  5. */
  6.  
  7. #include "stdafx.h"
  8. #include "3DFont.h"
  9.  
  10. #include "MainFrm.h"
  11.  
  12. #ifdef _DEBUG
  13. #define new DEBUG_NEW
  14. #undef THIS_FILE
  15. static char THIS_FILE[] = __FILE__;
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CMainFrame
  20.  
  21. IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
  22.  
  23. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  24.     //{{AFX_MSG_MAP(CMainFrame)
  25.     ON_WM_QUERYNEWPALETTE()
  26.     ON_WM_PALETTECHANGED()
  27.     //}}AFX_MSG_MAP
  28. END_MESSAGE_MAP()
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CMainFrame construction/destruction
  32.  
  33. CMainFrame::CMainFrame()
  34. {
  35.     // TODO: add member initialization code here
  36.     
  37. }
  38.  
  39. CMainFrame::~CMainFrame()
  40. {
  41. }
  42.  
  43. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  44. {
  45.     // TODO: Modify the Window class or styles here by modifying
  46.     //  the CREATESTRUCT cs
  47.  
  48.     return CFrameWnd::PreCreateWindow(cs);
  49. }
  50.  
  51. /////////////////////////////////////////////////////////////////////////////
  52. // CMainFrame diagnostics
  53.  
  54. #ifdef _DEBUG
  55. void CMainFrame::AssertValid() const
  56. {
  57.     CFrameWnd::AssertValid();
  58. }
  59.  
  60. void CMainFrame::Dump(CDumpContext& dc) const
  61. {
  62.     CFrameWnd::Dump(dc);
  63. }
  64.  
  65. #endif //_DEBUG
  66.  
  67. /////////////////////////////////////////////////////////////////////////////
  68. // CMainFrame message handlers
  69.  
  70. BOOL CMainFrame::OnQueryNewPalette() 
  71. {
  72.     // TODO: Add your message handler code here and/or call default
  73.     CView* pView = GetActiveView();
  74.     pView->Invalidate(FALSE); 
  75.  
  76.     return CFrameWnd::OnQueryNewPalette();
  77. }
  78.  
  79. void CMainFrame::OnPaletteChanged(CWnd* pFocusWnd) 
  80. {
  81.     CFrameWnd::OnPaletteChanged(pFocusWnd);
  82.     
  83.     // TODO: Add your message handler code here
  84.     CView* pView = GetActiveView();
  85.     if(pFocusWnd != pView) 
  86.         pView->Invalidate(FALSE); 
  87. }
  88.  
  89.